import { _decorator, Component, Node, ProgressBar } from 'cc';
import BaseView from '../../../../../extensions/gfw3_x/assets/scripts/gfw/mvc/BaseView';
import { pb } from '../../../pb/js/pb';
import gfw from '../../../../../extensions/gfw3_x/assets/scripts/gfw/gfw';
import { EventTouch } from 'cc';
import { AudioMgr } from '../../../../../extensions/gfw3_x/assets/scripts/gfw/manager/AudioMgr';
const { ccclass, property } = _decorator;

@ccclass('LoadingView')
export class LoadingView extends BaseView {
    @property(ProgressBar)
    progressBar: ProgressBar = null;

    start() {

    }

    update(deltaTime: number) {

    }

    onBtnClicked(e: EventTouch, data: string) {
        switch (data) {
            case `1`: {
                AudioMgr.inst.play(`audios/bgm1`)
                break;
            }
            case `2`: {
                AudioMgr.inst.play(`audios/bgm2`)
                // AudioMgr.inst.play(`audios/click1`)
                break;
            }
            case `3`: {
                AudioMgr.inst.playOneShot(`audios/click2`)
                break;
            }
        }
    }
}

